<form class="form-horizontal" role="form"  >
  <div class="form-group col-sm-6" >
    <div class="col-sm-12">
      名字
      <input type="text" class="form-control" id="firstname" [(ngModel)]="user.username" name="username" placeholder="请输入名字">
    </div>
    <div class="col-sm-12">
      密碼 <input type="password" class="form-control" [(ngModel)]="user.pwd" name="pwd" placeholder="請輸入密碼">
    </div>
    <div class="col-sm-2" *ngIf="!authService.isLogin()" class = "float-right">
      <input type="button" class="form-control" value="登錄" (click)="login()" >
    </div>
    <div class="col-sm-2" *ngIf="authService.isLogin()">
      <input type="button" class="form-control" (click)="logout()" value="退出" >
    </div>
  </div>
</form>


